<div class="championships generar">
	<h2><?php echo __('Matches'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo 'id'; ?></th>
			<th><?php echo 'name'; ?></th>
			<th><?php echo 'DT'; ?></th>
			<th><?php echo 'groups'; ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($matches as $match): ?>
	<tr>
		<td><?php echo h($match['Match']['id']); ?>&nbsp;</td>
		<td>
			<?php echo h($match['Match']['home']); ?>&nbsp;		</td>
		<td><?php echo h($match['Match']['visitor']); ?>&nbsp;
		</td>
		<td>
			<?php echo h($match['Match']['ended']); ?>&nbsp;		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $match['Team']['id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $match['Team']['id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $match['Team']['id']), null, __('Are you sure you want to delete # %s?', $match['Team']['id'])); ?>
			<?php echo $this->Html->link(__('Swap'), array('action' => 'swap', $match['Team']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	</div>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Match'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Championships'), array('controller' => 'championships', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Championship'), array('controller' => 'championships', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Teams'), array('controller' => 'teams', 'action' => 'index')); ?> </li>

	</ul>
</div>

<h1> <?php echo debug($matches); ?> </h1>